# -*- coding: utf-8 -*-
"""
Created on Mon Sep 12 20:03:56 2016

@author: zhiqiang
"""
param = input('请输入一个整数')
param = int(param)
if param<0:
    print('半径平方为负数，优雅点的个数为0')
if param==0:
    print('半径平方为0，优雅点即为圆心个数为1')
import math
res = 0
R = int(math.sqrt(param))+1
for i in range(R):
    for j in range(R):
        if i + j<math.sqrt(param):
            continue
        if i**2+j**2==param:
            if i!=0 and j!=0:
                res += 4
            else:
                res += 2
print('优雅点的个数为：',res)
